package nstock;

import javax.servlet.http.Cookie;

public class Cookiename {
	private  Cookie [] cn = null;
	public Cookiename(Cookie [] cnn)
	{
		this.cn = cnn;
	}
	public String searchbyName(String name)
	{
		for(int  i =0;i<cn.length;i++)
		{
			Cookie item = cn[i];
			if(item.getName().compareToIgnoreCase(name) == 0)
			{
				return item.getValue();
			}
		}
		return null;
	}

}
